<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="./../include/stdlib.jspf" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@include file="include/meta.jspf" %>
    <title>故障工单认领</title>
    <link rel="stylesheet" href="${root}/static/wechat/css.css">
    <link rel="stylesheet" href="${root}/static/wechat/index.css">
</head>
<body style="background-color: #fff">
<!--内容部分-->
<input type="hidden" id="id" value="${parent.id}">
<input type="hidden" id="repairManId" value="${wxUser.id}">
<div class="error_content">
    <h3><span>${entity.city.name}+${entity.district.name}+${entity.street.name}+${entity.location}</span>有一台设备，编号<span>${parent.code}</span>倾斜角为<span>5度，</span>同意前往修理吗？</h3>
</div>
<div class="error_inp">
    <input type="button" value="同意" class="but_o" id="agree">
    <input type="button" value="拒绝" class="but_t" id="refuse">
</div>
</body>
<%@include file="include/script.jspf" %>
<script type="application/javascript">
    $('#agree').click(function () {
        var id, repairManId;
        id = $('#id').val();
        repairManId = $('#repairManId').val();
        request.post("resources/billboardMalfunction/save/repairMan", {
            id: id,
            repairManId: repairManId
        }, function (data) {
            console.log(data);
            history.back();
        }, function (data) {
            console.log(data);
        });
    });
    $('#refuse').click(function () {
        history.back();
    })
</script>
</html>
